//
//  PlusMoreCollectionViewCell.m
//  BaChat
//
//  Created by 刘洋 on 16/6/21.
//  Copyright © 2016年 刘洋. All rights reserved.
//

#import "PlusMoreCollectionViewCell.h"

@interface PlusMoreCollectionViewCell ()




@end




@implementation PlusMoreCollectionViewCell

-(void)dealloc{
    
    [_bgImageView release];
    [_titleLabel release];
    [super dealloc];
    
}





-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubviews];
    }
    return self;
    
    
}

-(void)createSubviews{
    
    self.bgImageView = [[BaseImageView alloc]init];
    [self.contentView addSubview:self.bgImageView];
    self.bgImageView.backgroundColor = [UIColor clearColor];
    [_bgImageView release];
    
    
    self.titleLabel = [[BaseLabel alloc]init];
    self.titleLabel.backgroundColor = [UIColor clearColor];
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.font = [UIFont systemFontOfSize:ROOTHEIGHT / 100 * 1.8];
    [self.contentView addSubview:self.titleLabel];
    [_titleLabel release];
    
    
}

-(void)layoutSubviews{
    [super layoutSubviews];
    
    [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.left.right.mas_equalTo(self.contentView);
        make.height.mas_equalTo(self.contentView.frame.size.width);
        
    }];
    
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.bgImageView.mas_bottom).offset(5);
        make.right.left.mas_equalTo(self.contentView);
        make.height.mas_equalTo(20);
        
    }];
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
